<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>拖拽</title>
</head>
<body>
<script src="jquery-1.11.3.js"></script>
<script type="text/javascript" src="http://cdn.aodianyun.com/dms/rop_client.js"></script>
<script>
$(function(){
  //DMS
			function initDms(){
				//DMS链接
				topic = GLOBAL_DOMAIN + 'subtitle';
				funInterval = setInterval(funLoad,100);
			}
			function funLoad(){
				if(typeof(ROP) != 'undefined'){
					clearInterval(funInterval);
					ROP.Enter('pub_da3a9ab46491350ccbbe45888f637e0f','sub_9b28f3adb4e5507feb873d8bb20c4bc4');
				}
			}
			ROP.On("enter_suc",function(){
			dmsStatus = true;
			ROP.Subscribe(topic);
			})
			ROP.On("enter_fail",function(err){
			dmsStatus = false;
			})
			ROP.On("publish_data",function(data,topic){
				console.log(data);
				data = $.parseJSON(data);
				updateSelectVideo(data);

			})
			ROP.On("losed",function(){
			dmsStatus = false;
			})

});
</script>
</body>
</html>
